<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>失物详情 - 校园实物招领</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Pacifico&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#3B82F6',
                        secondary: '#10B981'
                    },
                    borderRadius: {
                        'none': '0px',
                        'sm': '2px',
                        DEFAULT: '4px',
                        'md': '8px',
                        'lg': '12px',
                        'xl': '16px',
                        '2xl': '20px',
                        '3xl': '24px',
                        'full': '9999px',
                        'button': '4px'
                    }
                }
            }
        }
    </script>
    <style>
        .image-gallery {
            scroll-snap-type: x mandatory;
        }
        .image-gallery-item {
            scroll-snap-align: start;
        }
        .tag {
            transition: all 0.2s ease;
        }
        .tag:hover {
            transform: translateY(-2px);
        }
        .copy-btn:hover i {
            color: #3B82F6;
        }
        .fixed-bottom-bar {
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        }
    </style>
</head>
<body class="bg-gray-50 min-h-[1024px] font-sans text-gray-800">
    <div class="max-w-4xl mx-auto pb-24">
        <!-- 顶部导航 -->
        <header class="sticky top-0 bg-white z-10 py-4 px-6 border-b border-gray-100">
            <div class="flex items-center justify-between">
                <button class="flex items-center text-gray-600 hover:text-primary">
                    <i class="fas fa-chevron-left text-lg w-6 h-6 flex items-center justify-center"></i>
                    <span class="ml-2">返回</span>
                </button>
                <h1 class="text-xl font-semibold">失物详情</h1>
                <button class="text-gray-500 hover:text-red-500">
                    <i class="fas fa-flag w-6 h-6 flex items-center justify-center"></i>
                </button>
            </div>
        </header>

        <main class="px-6">
            <!-- 物品状态标签 -->
            <div class="mt-4">
                <span class="inline-block bg-green-100 text-green-800 px-3 py-1 rounded-button text-sm font-medium">
                    未认领
                </span>
            </div>

            <!-- 物品图片轮播 -->
            <div class="mt-6 relative">
                <div class="image-gallery flex overflow-x-auto snap-x snap-mandatory rounded-xl bg-gray-100 h-80">
                    <div class="image-gallery-item flex-shrink-0 w-full h-full">
                        <img src="https://ai-public.mastergo.com/ai/img_res/df9517b9bb4a567e1684189475a2f964.jpg" 
                             class="w-full h-full object-cover object-top" alt="物品图片">
                    </div>
                    <div class="image-gallery-item flex-shrink-0 w-full h-full">
                        <img src="https://ai-public.mastergo.com/ai/img_res/670287d69b81defb1b47c24d36a7c4c1.jpg" 
                             class="w-full h-full object-cover object-top" alt="物品细节">
                    </div>
                </div>
                <div class="absolute bottom-4 right-4 bg-white bg-opacity-80 rounded-full px-3 py-1 text-sm">
                    <span class="text-gray-700">1</span>
                    <span class="text-gray-400">/</span>
                    <span class="text-gray-500">2</span>
                </div>
            </div>

            <!-- 物品基本信息 -->
            <div class="mt-6">
                <h2 class="text-2xl font-bold">黑色皮质双肩背包</h2>
                <div class="flex items-center mt-2 text-gray-500 text-sm">
                    <span>发布于 2023-11-15 14:30</span>
                    <span class="mx-2">•</span>
                    <span>浏览 128 次</span>
                </div>

                <div class="mt-4 grid grid-cols-3 gap-4">
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="text-gray-500 text-sm">拾取地点</div>
                        <div class="font-medium mt-1 flex items-center">
                            <i class="fas fa-map-marker-alt text-primary mr-2 w-4 h-4 flex items-center justify-center"></i>
                            <span>图书馆三楼自习区</span>
                        </div>
                    </div>
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="text-gray-500 text-sm">拾取时间</div>
                        <div class="font-medium mt-1 flex items-center">
                            <i class="fas fa-clock text-primary mr-2 w-4 h-4 flex items-center justify-center"></i>
                            <span>2023-11-15 13:45</span>
                        </div>
                    </div>
                    <div class="bg-gray-50 p-3 rounded-lg">
                        <div class="text-gray-500 text-sm">物品类别</div>
                        <div class="font-medium mt-1 flex items-center">
                            <i class="fas fa-tag text-primary mr-2 w-4 h-4 flex items-center justify-center"></i>
                            <span>箱包</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 详细信息区块 -->
            <div class="mt-8">
                <h3 class="text-lg font-semibold border-b pb-2 border-gray-100">物品描述</h3>
                <div class="mt-3 text-gray-700 leading-relaxed">
                    <p>这是一个黑色皮质双肩背包，品牌为JanSport，主拉链处挂有一个小熊挂件。背包前侧有一个小口袋，内部有笔记本电脑隔层（可容纳15.6寸笔记本），两侧有网兜可放水杯。背包整体状况良好，无明显磨损。</p>
                </div>

                <div class="mt-6">
                    <h3 class="text-lg font-semibold border-b pb-2 border-gray-100">特征标签</h3>
                    <div class="mt-3 flex flex-wrap gap-2">
                        <span class="tag bg-blue-50 text-blue-800 px-3 py-1 rounded-full text-sm">黑色</span>
                        <span class="tag bg-blue-50 text-blue-800 px-3 py-1 rounded-full text-sm">皮质</span>
                        <span class="tag bg-blue-50 text-blue-800 px-3 py-1 rounded-full text-sm">双肩包</span>
                        <span class="tag bg-blue-50 text-blue-800 px-3 py-1 rounded-full text-sm">JanSport品牌</span>
                        <span class="tag bg-blue-50 text-blue-800 px-3 py-1 rounded-full text-sm">小熊挂件</span>
                    </div>
                </div>

                <div class="mt-6">
                    <h3 class="text-lg font-semibold border-b pb-2 border-gray-100">拾取位置详情</h3>
                    <div class="mt-3">
                        <div class="flex items-start">
                            <i class="fas fa-map-marker-alt text-primary mt-1 mr-3 w-5 h-5 flex items-center justify-center"></i>
                            <div>
                                <p class="font-medium">图书馆三楼自习区 靠窗第4排座位</p>
                                <p class="text-gray-500 mt-1 text-sm">物品被发现放在座位下方的地板上</p>
                                <button class="mt-2 text-primary text-sm font-medium flex items-center copy-btn" data-text="图书馆三楼自习区 靠窗第4排座位">
                                    <i class="fas fa-copy mr-1 w-4 h-4 flex items-center justify-center"></i>
                                    <span>复制位置</span>
                                </button>
                            </div>
                        </div>
                        <div class="mt-4 h-48 bg-gray-100 rounded-lg relative overflow-hidden">
                            <img src="https://ai-public.mastergo.com/gen_page/map_placeholder_1280x720.png" 
                                 class="w-full h-full object-cover object-top" alt="位置地图">
                            <button class="absolute inset-0 flex items-center justify-center bg-black bg-opacity-20 text-white">
                                <div class="bg-white text-primary px-4 py-2 rounded-button font-medium flex items-center">
                                    <i class="fas fa-map mr-2 w-4 h-4 flex items-center justify-center"></i>
                                    <span>查看详细地图</span>
                                </div>
                            </button>
                        </div>
                    </div>
                </div>

                <div class="mt-6">
                    <h3 class="text-lg font-semibold border-b pb-2 border-gray-100">拾取时间详情</h3>
                    <div class="mt-3 flex items-start">
                        <i class="fas fa-clock text-primary mt-1 mr-3 w-5 h-5 flex items-center justify-center"></i>
                        <div>
                            <p class="font-medium">2023年11月15日 星期三 下午1:45</p>
                            <p class="text-gray-500 mt-1 text-sm">物品在图书馆闭馆前被发现</p>
                            <button class="mt-2 text-primary text-sm font-medium flex items-center copy-btn" data-text="2023年11月15日 星期三 下午1:45">
                                <i class="fas fa-copy mr-1 w-4 h-4 flex items-center justify-center"></i>
                                <span>复制时间</span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!-- 发布者信息 -->
            <div class="mt-8 bg-gray-50 rounded-xl p-5">
                <h3 class="text-lg font-semibold border-b pb-2 border-gray-200">发布者信息</h3>
                <div class="mt-4 flex items-center">
                    <div class="w-12 h-12 rounded-full overflow-hidden bg-gray-200">
                        <img src="https://ai-public.mastergo.com/ai/img_res/3d3547b58c03ae6a1f7cc12e207a6783.jpg" 
                             class="w-full h-full object-cover" alt="发布者头像">
                    </div>
                    <div class="ml-4">
                        <div class="flex items-center">
                            <span class="font-medium">林雨晴</span>
                            <span class="ml-2 bg-blue-50 text-blue-800 px-2 py-0.5 rounded-full text-xs">学生</span>
                        </div>
                        <div class="mt-1 flex items-center text-sm text-gray-500">
                            <i class="fas fa-star text-yellow-400 mr-1 w-3 h-3 flex items-center justify-center"></i>
                            <span>4.8</span>
                            <span class="mx-1">•</span>
                            <span>已发布12件失物</span>
                            <span class="mx-1">•</span>
                            <span>成功归还8件</span>
                        </div>
                    </div>
                </div>
                <button class="mt-4 w-full border border-primary text-primary hover:bg-primary hover:text-white py-2 rounded-button font-medium transition-colors duration-200">
                    <i class="fas fa-comment-dots mr-2 w-4 h-4 flex items-center justify-center"></i>
                    <span>联系发布者</span>
                </button>
            </div>

            <!-- 相似物品推荐 -->
            <div class="mt-10">
                <h3 class="text-lg font-semibold border-b pb-2 border-gray-100">相似物品</h3>
                <div class="mt-4 grid grid-cols-2 gap-4">
                    <a href="#" class="bg-white rounded-lg overflow-hidden border border-gray-100 hover:shadow-md transition-shadow duration-200">
                        <div class="h-32 bg-gray-100">
                            <img src="https://ai-public.mastergo.com/ai/img_res/4a1971e848e3423ce90a55335488454f.jpg" 
                                 class="w-full h-full object-cover object-top" alt="相似物品">
                        </div>
                        <div class="p-3">
                            <h4 class="font-medium truncate">灰色简约双肩包</h4>
                            <div class="mt-1 flex items-center text-sm text-gray-500">
                                <i class="fas fa-map-marker-alt mr-1 w-3 h-3 flex items-center justify-center"></i>
                                <span class="truncate">教学楼B区</span>
                            </div>
                        </div>
                    </a>
                    <a href="#" class="bg-white rounded-lg overflow-hidden border border-gray-100 hover:shadow-md transition-shadow duration-200">
                        <div class="h-32 bg-gray-100">
                            <img src="https://ai-public.mastergo.com/ai/img_res/908b611ce077d462c509cef341ec1e9c.jpg" 
                                 class="w-full h-full object-cover object-top" alt="相似物品">
                        </div>
                        <div class="p-3">
                            <h4 class="font-medium truncate">蓝色帆布背包</h4>
                            <div class="mt-1 flex items-center text-sm text-gray-500">
                                <i class="fas fa-map-marker-alt mr-1 w-3 h-3 flex items-center justify-center"></i>
                                <span class="truncate">学生食堂二楼</span>
                            </div>
                        </div>
                    </a>
                </div>
            </div>
            <!-- 温馨提示 -->
            <div class="mt-8 bg-blue-50 rounded-xl p-5">
                <h3 class="text-lg font-semibold text-blue-800 flex items-center">
                    <i class="fas fa-info-circle mr-2 w-5 h-5 flex items-center justify-center"></i>
                    <span>认领须知</span>
                </h3>
                <ul class="mt-3 text-blue-800 text-sm space-y-2">
                    <li class="flex items-start">
                        <i class="fas fa-check-circle mt-1 mr-2 w-4 h-4 flex items-center justify-center"></i>
                        <span>认领时请准确描述物品特征，提供相关证明</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fas fa-check-circle mt-1 mr-2 w-4 h-4 flex items-center justify-center"></i>
                        <span>认领地点一般为拾取地点或双方协商的公共场所</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fas fa-check-circle mt-1 mr-2 w-4 h-4 flex items-center justify-center"></i>
                        <span>请勿在夜间或人少的地方进行物品交接</span>
                    </li>
                    <li class="flex items-start">
                        <i class="fas fa-check-circle mt-1 mr-2 w-4 h-4 flex items-center justify-center"></i>
                        <span>如发现可疑情况，请立即联系校园安保</span>
                    </li>
                </ul>
            </div>
        </main>
    </div>

    <!-- 底部操作栏 -->
    <div class="fixed-bottom-bar fixed bottom-0 left-0 right-0 bg-white py-3 px-6 border-t border-gray-100">
        <div class="max-w-4xl mx-auto flex items-center justify-between">
            <div class="flex space-x-3">
                <button class="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-600 hover:text-primary">
                    <i class="fas fa-heart w-5 h-5 flex items-center justify-center"></i>
                </button>
                <button class="w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-gray-600 hover:text-primary">
                    <i class="fas fa-share-alt w-5 h-5 flex items-center justify-center"></i>
                </button>
            </div>
            <div class="flex space-x-4">
                <button class="bg-primary hover:bg-primary-dark text-white px-6 py-2 rounded-button font-medium whitespace-nowrap">
                    <i class="fas fa-hand-holding-heart mr-2 w-4 h-4 flex items-center justify-center"></i>
                    <span>我是失主</span>
                </button>
            </div>
        </div>
    </div>

    <script>
        // 复制功能实现
        document.querySelectorAll('.copy-btn').forEach(btn => {
            btn.addEventListener('click', function() {
                const text = this.getAttribute('data-text');
                navigator.clipboard.writeText(text).then(() => {
                    const icon = this.querySelector('i');
                    icon.classList.remove('fa-copy');
                    icon.classList.add('fa-check');
                    setTimeout(() => {
                        icon.classList.remove('fa-check');
                        icon.classList.add('fa-copy');
                    }, 2000);
                });
            });
        });

        // 图片轮播指示器更新
        const gallery = document.querySelector('.image-gallery');
        if (gallery) {
            gallery.addEventListener('scroll', function() {
                const index = Math.round(this.scrollLeft / this.clientWidth);
                const indicator = document.querySelector('.image-gallery + div span:first-child');
                if (indicator) {
                    indicator.textContent = index + 1;
                }
            });
        }
    </script>
</body>
</html>